public class PC
{
    private CPU cpu;
    private HardDisk harddisk;

    public PC()
    {
        cpu = new CPU();
        harddisk = new HardDisk();
    }

    public PC(CPU cpu,HardDisk harddisk)
    {
        this.cpu = cpu;
        this.harddisk = harddisk;
    }

    public void setCPU(CPU cpu)
    {
        this.cpu = cpu;
    }

    public void setHardDisk(HardDisk harddisk)
    {
        this.harddisk = harddisk;
    }

    public void show()
    {
        System.out.println("CPU Speed: " + cpu.getSpeed());
        System.out.println("HardDisk amount: " + harddisk.getAmount());
    }
}
